package pojoaction;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import domain.User;

@Controller
public class RegisAction {

	@RequestMapping("/SevletApi")
	public void tSevletApi(HttpServletResponse response) throws IOException {
		PrintWriter writer = response.getWriter();
		writer.write("spring mvc");
		//return SUCCESS;
	}

	private static final String SUCCESS = "success";

	@RequestMapping("/regis")
	public String tRegis(User user) {
		System.out.println(user.toString());
		return SUCCESS;
	}
}
